From ee62a482797fda28eb525d2075603e7833ae551b Mon Sep 17 00:00:00 2001 From: Hollis Blanchard Date: Fri, 6 Oct 2006 12:15:06 -0500 Subject: [PATCH] [POWERPC][XEN] Fix yaboot loading and other linker script tweaks. yaboot refuses to load segments at file offset 0, so move the ELF headers out of our text segment. Also hardcode the link address in the linker script, and remove the now-inaccurate start/end comments. Signed-off-by: Hollis Blanchard --HG-- extra : transplant_source : %A4%1B%8C%D0%1A%D2%87%D6%0A%5EY%CC%FF%A2%3B%5D%D8%83z%F8 --- xen/arch/powerpc/Makefile | 2 +- xen/arch/powerpc/xen.lds.S | 8 ++------ 2 files changed, 3 insertions(+), 7 deletions(-) diff --git a/xen/arch/powerpc/Makefile b/xen/arch/powerpc/Makefile index f5dc88d7f6..b03c9f0bc0 100644 --- a/xen/arch/powerpc/Makefile +++ b/xen/arch/powerpc/Makefile @@ -96,7 +96,7 @@ endif cmdline.o: cmdline.dep cmdline.o: CFLAGS += -DCMDLINE="\"$(FULL_CMDLINE)\"" -TARGET_OPTS = $(OMAGIC) -Wl,-Ttext,0x400000,-T,xen.lds +TARGET_OPTS = $(OMAGIC) -Wl,-T,xen.lds TARGET_OPTS += start.o $(ALL_OBJS) .xen-syms: start.o $(ALL_OBJS) xen.lds diff --git a/xen/arch/powerpc/xen.lds.S b/xen/arch/powerpc/xen.lds.S index ea2e56725a..2fe00d7b60 100644 --- a/xen/arch/powerpc/xen.lds.S +++ b/xen/arch/powerpc/xen.lds.S @@ -12,12 +12,12 @@ SEARCH_DIR("=/usr/local/lib64"); SEARCH_DIR("=/lib64"); SEARCH_DIR("=/usr/lib64" __DYNAMIC = 0; */ PHDRS { - text PT_LOAD FILEHDR PHDRS; + text PT_LOAD; } SECTIONS { + . = 0x00400000; /* Read-only sections, merged into text segment: */ - PROVIDE (__executable_start = 0x10000000); . = 0x10000000 + SIZEOF_HEADERS; .interp : { *(.interp) } :text .hash : { *(.hash) } .dynsym : { *(.dynsym) } @@ -111,8 +111,6 @@ SECTIONS SORT(CONSTRUCTORS) } - /* Xen addition */ - . = ALIGN(32); __setup_start = .; .setup.init : { *(.setup.init) } @@ -131,8 +129,6 @@ SECTIONS . = ALIGN(STACK_SIZE); __per_cpu_end = .; - /* end Xen addition */ - .data1 : { *(.data1) } .tdata : { *(.tdata .tdata.* .gnu.linkonce.td.*) } .tbss : { *(.tbss .tbss.* .gnu.linkonce.tb.*) *(.tcommon) } -- 2.30.2